<script>-- Handler that exports the contents of every card and bkgnd field to a text file.
on mouseUp
if bg fld "Company" is empty then
answer "Please enter your company name before sending."
select text of bg fld "Company"
else if bg fld "Address" is empty then
answer "Please enter the company address before sending."
select text of bg fld "Address"
else if bg fld "Phone" is empty then
answer "Please enter your telephone number before sending."
select text of bg fld "Phone"
else if bg fld "Customer Number" is empty then
answer "Please enter the customer number before sending."
select text of bg fld "Customer Number"
else if bg fld "Certified Contact" is empty then
answer "Please enter the certified contact's name before sending."
select text of bg fld "Certified Contact"
else
put getBodyText() into infoMessage
exporttext infoMessage
end if
end mouseUp
on exportText bodyMsg --exports all data to text file.
put empty into LinkCC
put "Developer Information Change" into LinkSubject
put "DATABASE" into LinkTo
DropInOB_6 LinkTo, LinkCC, LinkSubject, bodyMsg
answer "Your Change of Name/Address Form is placed in your AppleLink Out Basket."
end exportText</script>
</part>
<part>
<id>25</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>0</left>
<top>180</top>
<right>25</right>
<bottom>209</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>8350</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script></script>
</part>
<part>
<id>26</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>0</left>
<top>19</top>
<right>25</right>
<bottom>48</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>8350</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script></script>
</part>
<part>
<id>36</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>340</left>
<top>320</top>
<right>409</right>
<bottom>338</bottom>
</rect>
<style>transparent</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Save</name>
<script>on mouseup
doMessageSave
end mouseUp
</script>
</part>
<part>
<id>46</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <true /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>180</left>
<top>187</top>
<right>440</right>
<bottom>201</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <true /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<textHeight>13</textHeight>
<name>Company</name>
<script>on keyDown ch
if lengthOK(ch, 35, "company name") then pass keyDown
end keyDown</script>
</part>
<part>
<id>47</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <true /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>180</left>
<top>200</top>
<right>440</right>
<bottom>253</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <true /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<textHeight>13</textHeight>
<name>Address</name>
<script></script>
</part>
<part>
<id>48</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <true /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>180</left>
<top>252</top>
<right>440</right>
<bottom>266</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <true /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<textHeight>13</textHeight>
<name>Phone</name>
<script></script>
</part>
<part>
<id>66</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>253</left>
<top>320</top>
<right>322</right>
<bottom>338</bottom>
</rect>
<style>transparent</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Back</name>
<script>on mouseup
global gDIAFromDIA
if bg fld "Company" is not empty then
answer "Save the message in a text file?" with "Cancel" ¬
or "Back" or "Save"
if it is "Cancel" then exit mouseUp
if it is "Back" then
goToDIA
exit mouseUp
end if
if it is "Save" then
doMessageSave
end if
else
goToDIA
end if
end mouseUp
on goToDIA
global gDIAWhereDIA
if there is a window "Developer Info Assistant" then -- IF ALREADY OPEN
show window "Developer Info Assistant"
else if gDIAWhereDIA is not empty then
go stack gDIAWhereDIA in a new window
else
put thisFolder()&"Developer Info Assistant" into localName
if there is a file localName then -- IN CURRENT FOLDER
go stack localName in new window
else
answer file "Please locate the Developer Info Assistant Stack. It must"¬
&& "be on your local hard disk."
if it is "cancel" then exit goToDIA
go stack it in new window -- LAST RESORT ASK WHERE
end if
end if
end goToDIA</script>
</part>
<part>
<id>70</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <true /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>9</left>
<top>48</top>
<right>488</right>
<bottom>69</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Times</font>
<textSize>18</textSize>
<textStyle>bold</textStyle>
<textHeight>24</textHeight>
<name>Question</name>
<script></script>
</part>
<part>
<id>71</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <true /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>9</left>
<top>68</top>
<right>505</right>
<bottom>140</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Palatino</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Text Info Paragraph 1</name>
<script></script>
</part>
<part>
<id>73</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <true /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>180</left>
<top>265</top>
<right>440</right>
<bottom>279</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <true /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<textHeight>13</textHeight>
<name>Customer Number</name>
<script>on keyDown ch
if lengthOK(ch, 11, "customer number") then
get charToNum (ch)
if (it ≠ 3) and (it ≠ 8) and (it ≠ 9) and (it ≠ 13) then
if ch is not a number then
answer "Customer number consists of digits only."
else
pass keyDown
end if
else
pass keyDown
end if
end if
end keyDown</script>
</part>
<part>
<id>78</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <true /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>180</left>
<top>278</top>
<right>440</right>
<bottom>292</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <true /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<textHeight>13</textHeight>
<name>Certified Contact</name>
<script>on keyDown ch
if lengthOK(ch, 20, "certified contact name") then pass keyDown
end keyDown</script>
</part>
<part>
<id>79</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <true /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>180</left>
<top>291</top>
<right>440</right>
<bottom>305</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <true /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<textHeight>13</textHeight>
<name>Technical Contact</name>
<script>on keyDown ch
if lengthOK(ch, 20, "technical contact name") then pass keyDown
end keyDown</script>
</part>
<part>
<id>80</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <true /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>180</left>
<top>304</top>
<right>440</right>
<bottom>318</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <true /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<textHeight>13</textHeight>
<name>Marketing Contact</name>
<script>on keyDown ch
if lengthOK(ch, 20, "marketing contact name") then pass keyDown
end keyDown</script>
</part>
<part>
<id>81</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <true /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>9</left>
<top>142</top>
<right>505</right>
<bottom>186</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Palatino</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Text Info Paragraph 2</name>
<script></script>
</part>
<content>
<layer>background</layer>
<id>1</id>
<text>Change of Name/Address Form</text>
</content>
<content>
<layer>background</layer>
<id>70</id>
<text>Have you moved or changed company information?</text>
</content>
<content>
<layer>background</layer>
<id>71</id>
<text>Developer Programs delivers its monthly mailings to the Certified contact at your company. (Additional subscriptions to the Developer Mailing may be ordered through APDA). We may occasionally deliver specialized information to the Marketing or Technical contact as well. (Each contact should be reachable through your main corporate address.) </text>
</content>
<content>
<layer>background</layer>
<id>81</id>
<text>If you have recently moved or had a contact change, please take a few minutes to fill out and send this form to ensure we have the most current and accurate information for your company.</text>
</content>
<name>entry</name>
<script>function getBodyText
put headerInfo() into infoMessage
put customerInfo() after infoMessage
return infoMessage
end getBodyText
on doMessageSave
put getBodyText() into bodyMessage
ask file "File name to use for this text?" ¬
with "Change of Address Text"
if It is empty then exit doMessageSave
put it into fileName
open file fileName
write bodyMessage to file fileName
close file fileName
get the result
if it is not empty then
answer "ERROR: " & return & it
else
put changeFileType (fileName,"TEXT","ttxt") into it
if it contains "noError" then
answer "A TeachText TEXT file has been created."
else
answer it
end if
end if
end doMessageSave
function lengthOK ch, maxChars, fieldName
get CharToNum(ch)
if (it ≠ 3) and (it ≠ 8) and (it ≠ 9) and (it ≠ 13) then
if the number of chars of target ‚â• maxChars then
answer "A maximum of" && maxChars && "characters is allowed for the" && fieldName & "."